package muilty_thread.pic_java_design_pattern.balking;

import lombok.SneakyThrows;

/**
 * @version: 1.0
 * @Description: TODO
 * @author: zZmH
 * @date: 2020/10/12 23:37
 */


public class SaverThread implements Runnable {
    private final Data data;

    public SaverThread(Data data) {
        this.data = data;
    }

    @SneakyThrows
    @Override
    public void run() {
        data.save();
        Thread.sleep(1000);
    }
}
